//
//  HZNavigationViewController.m
//  DarenForum
//
//  Created by 刘华舟 on 15/4/2.
//  Copyright (c) 2015年 刘华舟 khzliu@163.com. All rights reserved.
//

#import "HZNavigationViewController.h"
#import "HZRootViewController.h"
#import "HZGlobleConstant.h"

@interface HZNavigationViewController ()

@end

@implementation HZNavigationViewController

- (instancetype)initWithRootViewController:(UIViewController *)rootViewController{
    
    if (self = [super initWithRootViewController:rootViewController]) {
        float version = [[[UIDevice currentDevice] systemVersion] floatValue];
        if (version >= 7.0) {
            [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationbar_background_64"] forBarMetrics:UIBarMetricsDefault];
        }else{
            [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationbar_background_44"] forBarMetrics:UIBarMetricsDefault];
        }
    }
    return self;
}


- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super initWithCoder:aDecoder]) {
        float version = [[[UIDevice currentDevice] systemVersion] floatValue];
        if (version >= 7.0) {
            [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationbar_background_64"] forBarMetrics:UIBarMetricsDefault];
        }else{
            [self.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationbar_background_44"] forBarMetrics:UIBarMetricsDefault];
        }
    }
    return self;
}

@end
